home *** CD-ROM | disk | FTP | other *** search
/ Aminet 21 / Aminet 21 (1997)(GTI - Schatztruhe)[!][Oct 1997].iso / Aminet / biz / swood / FW_Font_eng.lha / FW_Font-e / FontLook-Auto.fw < prev    next >
Encoding:
Text File  |  1997-08-13  |  5.7 KB  |  215 lines

  1. /* Optimized with RexxOpt 1.7 */
  2.  
  3. Address='FinalW'
  4. Options results
  5. STATUS PORTNAME
  6. FW=result
  7. address=FW
  8. SIGNAL ON BREAK_C
  9. 'ShowMessage 2 0 "FontLook - Auto V2.80" "for Font-Directories..." "(©) Heiko Schröder - 08/07/97" ":-)" "Ok" "(-:"'
  10. 'ShowMessage 1 1 "A T T E N T I O N !" "The macro needs an empty document." "Clear the document?" "Yes" "Abort" ""'
  11. if result=2 then call BREAK_C
  12. Cleardoc Force
  13. 'ShowMessage 2 0 "codes or layout" "" "" "codes" "layout" ""'
  14. cl=result
  15. 'ShowMessage 2 0 "Screen output?" "" "" "normal" "speed" ""'
  16. ba=result
  17. Temp="ram:fonts.info"
  18. if ~show('L',"rexxreqtools.library") then;do
  19. if ~addlib('rexxreqtools.library',0,-30,0) then;do
  20. 'ShowMessage 1 1 "Error...." "I need the RexxReqTools.library" " E N D ! !" "Okay" "" ""'
  21. exit
  22. end
  23. end
  24. dir=rtfilerequest("FWFonts/SWOLFonts/",,"Select a directory...",,"rt_pubscrname=FinalWriterPubScreen rtfi_flags = freqf_nofiles")
  25. if dir="" then;do
  26. 'ShowMessage 1 1 "No directory selected!" " E N D ! !" "" "Okay" "" ""'
  27. exit
  28. end
  29. dir=d2c(34)||dir||d2c(34)
  30. address command 'list ' dir||' to=' Temp||' files lformat "%s%s"'
  31. if OPEN('file',Temp,"R") then
  32. If Seek("file",0,"E")=0 then;do
  33. 'ShowMessage 1 1 "Directory is empty!" " E N D ! !" "" "Okay" "" ""'
  34. address "REXX"
  35. close("file")
  36. EXIT
  37. end
  38. address "REXX"
  39. close("file")
  40. address command 'sort ' Temp Temp
  41. OPEN('file',Temp,"R")
  42. address(FW)
  43. 'ShowMessage 1 0 "Do you need perforation signs?" "" "" "Yes" "No" ""'
  44. lm=result
  45. 'ShowMessage 1 0 "Whats next?" "" "" "save" "save + print" "print"'
  46. wgw=result
  47. IF ba=2 THEN;DO
  48. status WINDOW
  49. parse VAR result links oben breite hoehe minbreite minhoehe .
  50. sizewindow minbreite minhoehe
  51. End
  52. DO WHILE 1
  53. FullFontName=ReadLn('file')
  54. IF EOF('file') THEN;do
  55. address "REXX"
  56. close('file')
  57. call Ende
  58. End
  59. If (Lastpos(".info",FullFontName)=0&Lastpos(".otag",FullFontName)=0&Lastpos(".type",FullFontName)=0&Lastpos(".afm",FullFontName)=0&Lastpos(".lib",FullFontName)=0) then;do
  60. GetDocItemPrefs Decimal
  61. Punkt=Result
  62. If Punkt="Comma" then DocItemPrefs Decimal Period
  63. TextTool
  64. Font FullFontName
  65. a=RC
  66. If a=0 then;do
  67. Type d2c(32)
  68. BackSpace
  69. status FontPath
  70. FullFontName=result
  71. pos=max(index(FullFontName,':'),lastpos('/',FullFontName))
  72. IF (pos~=0) THEN ShortFontName=RIGHT(FullFontName,LENGTH(FullFontName)-pos)
  73. else ShortFontName=FullFontName
  74. IF ba=2 THEN View 20
  75. GraphicTool
  76. Pagesetup Pagetype A4 Orient Tall Top 0 Bottom 2.54 Left 0 Right 0
  77. SectionSetup Top 2.54 Bottom 2.54 Inside 2 Outside 1
  78. LinePrefs LineWt .5
  79. DrawLine 1 2 3.5 20 3.5
  80. DrawLine 1 2 26 20 26
  81. If lm=1 then DrawLine 1 0.5 14.85 1 14.85
  82. TextTool
  83. If cl=1 then;do
  84. Do i=0 to 13
  85. SetTab i*1.3+0.8 Right
  86. End
  87. NameFont="FWDocs/Codes-"||ShortFontName
  88. Justify Center
  89. Font Softsans
  90. FontSize 18
  91. Type FullFontName;NewParagraph;NewParagraph
  92. DO a=33 BY 14 FOR 16
  93. Font Softsans
  94. FontSize 8
  95. zeile=""
  96. DO x=a TO a+13 WHILE x<256
  97. zeile=zeile|| d2c(9)||x|| d2c(32)|| d2c(x)
  98. END
  99. If x=256 then zeile=zeile|| d2c(9)
  100. Type zeile;NewParagraph
  101. Font FullFontName
  102. FontSize 24
  103. zeile=""
  104. DO x=a TO a+13 WHILE x<256
  105. zeile=zeile|| d2c(9)|| d2c(x)
  106. END
  107. If x=256 then zeile=zeile|| d2c(9)
  108. Type zeile;NewParagraph
  109. END
  110. FontSize 12
  111. Type d2c(9);NewParagraph
  112. Font Softsans
  113. FontSize 8
  114. Justify Right
  115. Type Date(O)" - "FullFontName
  116. END
  117. If cl=2 then;do
  118. Justify Center
  119. NameFont="FWDocs/Layout-"||ShortFontName
  120. Font Softsans
  121. FontSize 18
  122. Type ShortFontName;NewParagraph
  123. Justify Left
  124. Font FullFontName
  125. FontSize 8
  126. NewParagraph;Type "This is 8-point type - not easy to read!";NewParagraph
  127. FontSize 9
  128. Type "9-Point type is about the smallest readable size.";NewParagraph
  129. FontSize 10
  130. Type "With 10-point type, we have a normal text size.";NewParagraph
  131. FontSize 12
  132. Type "With some fonts, 12-point type is easier to read.";NewParagraph
  133. FontSize 14
  134. Type "14-point type is good for subheadings.";NewParagraph
  135. FontSize 16
  136. Type "For larger subheadings, try 16-point type.";NewParagraph
  137. FontSize 18
  138. Type "18-point type makes nice small headlines.";NewParagraph
  139. FontSize 24
  140. Type "24-point type is for medium headlines.";NewParagraph
  141. FontSize 36
  142. Type "36-point is for larger ones.";NewParagraph
  143. FontSize 48
  144. Type "48-point almost shouts!";NewParagraph
  145. FontSize 60
  146. Type "60-point is huge!";NewParagraph
  147. FontSize 12
  148. Font SoftSans
  149. Type d2c(32);NewParagraph
  150. NewParagraph;Type "NORMAL";NewParagraph
  151. FontSize 10
  152. Font FullFontName
  153. Type "ABCDEFGHIJKLMNOPQRSTUVWXYZ";NewParagraph
  154. Type "abcdefghijklmnopqrstuvwxyz 1234567890 !@#$%^&*()-+=[]{}/:;,.?";NewParagraph
  155. Type "The quick brown fox jumps over the lazy dog.";NewParagraph;NewParagraph;NewParagraph
  156. Font SoftSans
  157. Type "EXTENDED CHARACTERS";NewParagraph
  158. FontSize 10
  159. Font FullFontName
  160. DO j=128 BY 32 FOR 4
  161. Type XRange( d2c(j), d2c(j+31));NewParagraph
  162. End
  163. Status BodyTextHeight
  164. th=result
  165. FG=26.24-2.113-th
  166. FG=Trunc(FG*8/0.34)
  167. FontSize FG
  168. Type d2c(9)
  169. Font SoftSans
  170. FontSize 8
  171. NewParagraph
  172. Justify Right
  173. Type Date(O)" - "FullFontName
  174. End
  175. call VH
  176. If wgw~=3 then
  177. Save NameFont
  178. If wgw=2 then
  179. Print
  180. If wgw=3 then
  181. Print
  182. Cleardoc force
  183. END
  184. else;do
  185. call VH
  186. 'ShowMessage 1 1 "FW cant display this font..." "Its a non-FW-font..." "" "Okay" "" ""'
  187. end
  188. end
  189. END
  190. Ende:
  191. address(FW)
  192. Call VH
  193. If cl=1 then 'ShowMessage 2 1 "You can find the documents in the FWDocs-Drawer." "Recognizable on «Codes-.....«" "Thanx for use." "@-`-" "Please" ":-))"'
  194. If cl=2 then 'ShowMessage 2 1 "You can find the documents in the FWDocs-Drawer." "Recognizable on «Layout-.....«" "Thanx for use." "@-`-" "Please" ":-))"'
  195. 'ShowMessage 2 1 "© Heiko Schröder" "email: age@thepentagon.com" "http://yi.com/home/SchroederHeiko" "Okay" "Yes" ":-))"'
  196. Call SH
  197. Address command "delete ram:fonts.info QUIET"
  198. EXIT
  199. BREAK_C:
  200. call VH
  201. 'ShowMessage 1 1 "Macro aborted..." "" "" "I know..." "" ""'
  202. call SH
  203. address "REXX"
  204. CLOSE("file")
  205. Address command "delete ram:fonts.info QUIET"
  206. EXIT
  207. VH:
  208. If ba=2 then View
  209. Return
  210. SH:
  211. If ba=2 then;do
  212. SizeWindow breite hoehe
  213. If Punkt="Comma" then DocItemPrefs DECIMAL Comma
  214. end
  215. Return